home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / ni6510nt.zip / OEMSETUP.INF < prev    next >
INI File  |  1993-09-07  |  39KB  |  1,256 lines

  1.       
  2. [Identification]
  3.     OptionType = NetAdapter
  4.  
  5. [PlatformsSupported]
  6.     ISA
  7.     EISA
  8.     "Jazz-Internal Bus"
  9.  
  10. [LanguagesSupported]
  11.     ENG
  12.  
  13. [Options]
  14.     NI6510
  15.  
  16. [OptionsTextENG]
  17.     NI6510     = "Racal InterLan EtherBlaster/NI6510 Adapter"
  18.  
  19. [IRQ_Level]
  20. IRQ_3 = "3"
  21. IRQ_4 = "4"
  22. IRQ_5 = "5"
  23. IRQ_9 = "9"
  24. IRQ_12 = "12"
  25. IRQ_15 = "15"
  26.  
  27. [IOAddrChoices]
  28. IOAddr_1 = "0x0300", 768
  29. IOAddr_2 = "0x0320", 800
  30. IOAddr_3 = "0x0340", 832
  31. IOAddr_4 = "0x0360", 864
  32.  
  33. [DMAChoices]
  34. DMA_0 = 0
  35. DMA_3 = 3
  36. DMA_5 = 5
  37. DMA_6 = 6
  38. DMA_7 = 7
  39.  
  40. [FileConstants]
  41. UtilityInf      = "UTILITY.INF"
  42. ParamInf        = "NCPARAM.INF"
  43. subroutineinf   = "SUBROUTN.INF"
  44. SoftwareType    = "driver"
  45. Exit_Code       = 0
  46.  
  47. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  48. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  49.  
  50. IRQ_List = ^(IRQ_Level, 1)
  51. DMA_List = ^(DMAChoices, 1)
  52. ;IOADDR_Addr_List =  ^(IOBaseAddrValue,1)
  53. IOBaseAddressList  = ^(IOAddrChoices, 1)
  54. IOBaseAddressValue = ^(IOAddrChoices, 2)
  55. Manufacturer    = "Microsoft"
  56. ProductMajorVersion     = "3"
  57. ProductMinorVersion     = "1"
  58. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  59.  
  60. ProductSoftwareName     = "NI6510"
  61. ProductSoftwareTitle    = "Racal InterLan EtherBlaster/NI6510 Adapter Driver"
  62. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\NI6510.sys"
  63. NetRuleSoftwareType     = "NI6510Sys ndisDriver NI6510Driver"
  64. NetRuleSoftwareUse      = $(SoftwareType)
  65. NetRuleSoftwareBindForm = """NI6510Sys"" yes no container"
  66. NetRuleSoftwareClass    = {"NI6510Driver basic"}
  67. NetRuleSoftwareBindable = {"NI6510Driver NI6510Adapter non exclusive 100"}
  68.  
  69. ProductHardwareName     = "NI6510"
  70. ProductHardwareTitle = "Racal InterLan EtherBlaster/NI6510 Adapter"
  71. NetRuleHardwareType     = "NI6510 NI6510Adapter"
  72. NetRuleHardwareBindForm = " yes yes container"
  73. NetRuleHardwareClass    = {"NI6510Adapter basic"}
  74. ;
  75. ; Registry Key
  76. ;
  77. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  78. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  79.  
  80.  
  81. [GeneralConstants]
  82. ;
  83. ;  Program flow control variables.
  84. ;
  85. from      = ""
  86. to        = ""
  87. ;
  88. ;  Return codes; Exit_Code is set to one of these
  89. ;
  90. ExitCodeOk     = 0
  91. ExitCodeCancel = 1
  92. ExitCodeFatal  = 2
  93.  
  94. KeyNull         = ""
  95. MAXIMUM_ALLOWED   = 33554432
  96. RegistryErrorIndex = NO_ERROR
  97. KeyProduct      = ""
  98. KeyParameters   = ""
  99.  
  100. TRUE            = 1
  101. FALSE           = 0
  102. NoTitle            = 0
  103.  
  104. ExitState   = "Active"
  105. OldVersionExisted = $(FALSE)
  106.  
  107. DriverPath      = $(!STF_NTPATH)\drivers
  108.  
  109. ;***********************************************************************
  110. ; Language-Dependent Dialog Constants
  111. ;***********************************************************************
  112.  
  113. [FileConstantsENG]
  114. ;
  115. ;  Variables to support thermometer gauge and error dialogs
  116. ;
  117. ProCaption   = "Windows NT Setup"
  118. ProCancel    = "Cancel"
  119. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  120.                "Are you sure you want to cancel copying files?"
  121.  
  122. ProCancelCap = "Network Setup Message"
  123. ProText1     = "Copying:"
  124. ProText2     = "To:"
  125.  
  126. FunctionTitle   = "Racal InterLan EtherBlaster/NI6510 Ethernet Adapter Card Setup"
  127.  
  128. ProductSoftwareDescription   = "Racal InterLan EtherBlaster/NI6510 Adapter Driver"
  129. ProductHardwareDescription   = "Racal InterLan EtherBlaster/NI6510 Adapter"
  130.  
  131. [DialogConstantsENG]
  132. Help        = "&Help"
  133. Exit        = "Cancel"
  134. OK          = "OK"
  135. HelpContext = ""
  136. Continue    = "Continue"
  137. Cancel      = "Cancel"
  138.  
  139. [date]
  140.     ; Now is a list which contains { Sec from 1-1-1970, Year, Month, Day, Hour,
  141.     ; Minute, Second }
  142.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  143.  
  144.  
  145. [FileDependentDlgENG]
  146. DlgType = "MultiCombo"
  147.  
  148. DlgTemplate = "WD"
  149. Caption = $(FunctionTitle)
  150.  
  151. DlgText = "Please select values for the follwing fields:"
  152.  
  153. Combo1Label = "&IRQ Level:"
  154. Combo2Label = "I/O &Port Address:"
  155. Combo3Label = "&DMA Channel:"
  156. Combo1List = $(IRQ_List)
  157. Combo1Out  = $(IRQ_Level)
  158. ;Combo2List = $(IOADDR_Addr_List)
  159. ;Combo2Out  = $(IOBaseAddrValue)
  160. Combo2List = $(IOBaseAddressList)
  161. Combo2Out  = $(IOBaseAddress)
  162. Combo3List = $(DMA_List)
  163. Combo3Out  = $(DMAChannel)
  164.  
  165. ComboListItemsIn  = {Combo1List, Combo2List,Combo3List}
  166. ComboListItemsOut = {Combo1Out, Combo2Out,Combo3Out}
  167.  
  168. EditTextIn = ""
  169. EditTextLim = ""
  170. CBOptionsGreyed = {}
  171. NotifyFields = {NO, NO}
  172.  
  173. HelpContext = $(!IDH_DB_OEMNADE2_INS)
  174.  
  175. [Identify]
  176. ;    set STF_DISPLAYDEBUGOUTPUT = 1
  177. ;    set !DebugOutputControl = 1    
  178.  
  179.     read-syms Identification
  180.     set Status     = STATUS_SUCCESSFUL
  181.     set Identifier = $(OptionType)
  182.     set Media      = #("Source Media Descriptions", 1, 1)
  183.  
  184.     Return $(Status) $(Identifier) $(Media)
  185.  
  186. [ReturnOptions]
  187.  
  188.     set Status        = STATUS_FAILED
  189.     set OptionList     = {}
  190.     set OptionTextList = {}
  191.  
  192.     set LanguageList = ^(LanguagesSupported, 1)
  193.     Ifcontains(i) $($0) in $(LanguageList)
  194.  
  195.         ifstr(i) $($1) == ""
  196.                         goto returnoptions
  197.         endif
  198.  
  199.         set PlatformList = ^(PlatformsSupported, 1)
  200.         Ifcontains(i) $($1) in $(PlatformList)
  201.                         goto returnoptions
  202.         else
  203.                         set Status = STATUS_NOTSUPPORTED
  204.                         goto finish_ReturnOptions
  205.         endif
  206.     else
  207.                 set Status = STATUS_NOLANGUAGE
  208.                 goto finish_ReturnOptions
  209.     endif
  210.  
  211. returnoptions = +
  212.     set OptionList     = ^(Options, 1)
  213.     set OptionTextList = ^(OptionsText$($0), 1)
  214.     set Status         = STATUS_SUCCESSFUL
  215.  
  216. finish_ReturnOptions = +
  217.     Return $(Status) $(OptionList) $(OptionTextList)
  218.  
  219. [InstallOption]
  220.     set Status   = STATUS_FAILED
  221.     set Option   = $($1)
  222.     set SrcDir   = $($2)
  223.     set AddCopy  = $($3)
  224.     set DoCopy   = $($4)
  225.     set DoConfig = $($5)
  226.     set LanguageList = ^(LanguagesSupported, 1)
  227.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  228.         Return STATUS_NOLANGUAGE
  229.     endif
  230.  
  231.     set-subst LF = "\n"
  232.  
  233.     read-syms GeneralConstants
  234.     read-syms FileConstants
  235.  
  236.     read-syms DialogConstants$(!STF_LANGUAGE)
  237.     ifstr(i) $(!NTN_Origination) == "NCPA"
  238.         set Continue = "OK"
  239.     endif
  240.     read-syms FileConstants$(!STF_LANGUAGE)
  241.  
  242.     detect date
  243.  
  244.     set-title  $(FunctionTitle)
  245.  
  246.     set to   = Begin
  247.     set from = Begin
  248.     set CommonStatus = STATUS_SUCCESSFUL
  249.  
  250.     EndWait
  251. Begin = +
  252.     Set ActivateDetection = FALSE
  253.  
  254.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  255.         set StartLabel = removeadapter
  256.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  257.         set StartLabel = UpgradeSoftware
  258.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  259.         set StartLabel = bindingadapter
  260.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  261. ;        set ActivateDetection = TRUE
  262.         set StartLabel = configureadapter
  263.         ;
  264.         ;   You cannot config the software component
  265.         ;
  266.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  267.             Debug-Output "Cannot configure the Elink II driver software."
  268.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  269.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  270.                 Debug-Output "ShellCode error: cannot get an error string."
  271.                 goto ShellCodeError
  272.             endif
  273.             set Error = $($R0)
  274.             set from = end
  275.             set to = end
  276.             goto nonfatalinfo
  277.         endif
  278.     else
  279. ;        set ActivateDetection = TRUE
  280.         set StartLabel = installadapter
  281.         set OEM_ABANDON_OPTIONS = {}
  282.         set OEM_ABANDON_SOFTWARE = FALSE
  283.         set OEM_ABANDON_ON = TRUE
  284.     endif
  285.  
  286.  
  287.     ;===================================================
  288.     ;  Netcard Detection logic
  289.     ;
  290.     ;  Initialize use of netcard detection;
  291.     ;  Construct require global parameter variables
  292.     ;
  293.     Debug-Output "OEMNADE2.INF: =================================================="
  294.     Debug-Output "OEMNADE2.INF: STF_CWDIR is: "$(!STF_CWDIR)
  295.     Debug-Output "OEMNADE2.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  296.     Debug-Output "OEMNADE2.INF: Option is: "$(Option)
  297.     Debug-Output "OEMNADE2.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  298.     Debug-Output "OEMNADE2.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  299.     Debug-Output "OEMNADE2.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  300.     Debug-Output "OEMNADE2.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  301.     Debug-Output "OEMNADE2.INF: =================================================="
  302.  
  303.     Set DetectedCard = FALSE
  304.  
  305.     Ifstr(i) $(ActivateDetection) != TRUE
  306.         Goto $(StartLabel)
  307.     Endif
  308.     ;
  309.     ;  Set !STF_NC_PARAMS and !STF_NC_PNAMES by calling
  310.     ;    PARAM.INF!Param_BuildTypeLists.
  311.     ;   Pass it a list of the form:
  312.     ;
  313.     ;   {  { <param name>,
  314.     ;        <name of choice list var>,
  315.     ;        <name of default var> },
  316.     ;      ...
  317.     ;   }
  318.     ;
  319.     Set TypeList = {{IRQ, IRQ_List, IRQ_Level},+
  320.                     {IOADDR, IOBaseAddressList, IOBaseAddr},+
  321.                     {DMA, DMA_List, DMAChannel}+
  322.                     }
  323.  
  324.     Debug-Output "OEMNADE2.INF: Calling Param_BuildTypeLists"
  325.     Shell $(ParamInf) Param_BuildTypeLists $(Option) $(TypeList)
  326.     Set Status = $($R0)
  327.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  328.         Goto fataldetect
  329.     Endif
  330.  
  331.     Debug-Output "OEMNADE2.INF: Calling Param_SetDefaults"
  332.     Shell $(ParamInf) Param_SetDefaults {}
  333.  
  334.     ;  Establish presentation versions of choice lists.
  335.  
  336. ;    Shell $(ParamInf) HexListFromDecList $(IOADDR_Addr_List)
  337. ;    Set IOADDR_Hex_List = $($R0)
  338.  
  339.     ;  If this is a detected card, set the flag.
  340.  
  341.     Ifstr(i) $(!STF_NCDETECT) == YES
  342.         Ifstr(i) $(!STF_NCOPTION) == $(Option)
  343.            Set DetectedCard = TRUE
  344.            Debug-Output "OEMNADE2.INF: Setting DetectedCard to TRUE"
  345.         Endif
  346.     Endif
  347.     ;
  348.     ;  End Netcard Detection logic
  349.     ;===================================================
  350.  
  351.     Shell "" DebugConfiguration "After parameter querying"
  352.  
  353.     Set from = $(fatal)
  354.     Set to = $(fatal)
  355.     Goto $(StartLabel)
  356.  
  357. ;-----------------------------------------------
  358. ; Installation Section
  359. ;-----------------------------------------------
  360.  
  361. installadapter = +
  362. ;
  363. ;   First, check whether the same version of the software exists
  364. ;
  365.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  366.  
  367.     Ifstr $(KeyProduct) != $(KeyNull)
  368.         ;
  369.         ; Same version already existed in the local machine
  370.         ; Popup the dialog and ask the user whether he wants to continue
  371.         ;
  372.         CloseRegKey $(KeyProduct)
  373.  
  374.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  375.            ;
  376.            ; Cannot Install the same software again
  377.            ;
  378.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  379.                $(ProductVersion)
  380.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  381.                Debug-Output "ShellCode error: cannot get an error string."
  382.                goto ShellCodeError
  383.            endif
  384.  
  385.            goto end
  386.         else
  387.            ;
  388.            ; Add a new adapter card?
  389.            ;
  390.            Shell $(UtilityInf), CardExistedDlg
  391.  
  392.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  393.                Debug-Output "ShellCode error: cannot get an error string."
  394.                goto ShellCodeError
  395.            endif
  396.  
  397.            ifstr(i) $($R1) != "OK"
  398.                goto end
  399.            endif
  400.            set OldVersionExisted = $(TRUE)
  401.         endif
  402.     endif
  403.  
  404.     ;===================================================
  405.     ;  Netcard Detection logic
  406.     ;
  407.     ;   If this is a detected card, query its parameters
  408.     ;   and merge them into the default list.
  409.     ;
  410.     Ifstr(i) $(DetectedCard) != TRUE
  411.         Goto adaptersetup
  412.     Endif
  413.     ;
  414.     ;   Get the detected parameters
  415.     ;
  416.     StartWait
  417.     Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  418.     EndWait
  419.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  420.         Goto adaptersetup
  421.     Endif
  422.     ;
  423.     ;   Merge the detected values in.
  424.     ;
  425.     Set DetectedParams = $($R1)
  426.     Debug-Output "OEMNADE2.INF: Calling Param_SetDefaults to merge detected params"
  427.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  428.     ;
  429.     ;  End Netcard Detection logic
  430.     ;===================================================
  431.  
  432.     goto adaptersetup
  433.  
  434. ;-----------------------------------------------
  435. ; Configuration Section
  436. ;-----------------------------------------------
  437. ;
  438. ;   Get the current values of all the parameters
  439. ;
  440. configureadapter = +
  441.     Ifstr $(KeyProduct) == $(KeyNull)
  442.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  443.         Ifstr $(KeyProduct) == $(KeyNull)
  444.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  445.             Debug-Output "Cannot find component product key"
  446.             goto fatalregistry
  447.         Endif
  448.     Endif
  449.  
  450.     ;
  451.     ; Get the other parameters;  they're attached to the service parameters key
  452.     ;
  453.     Debug-Output "INF: Shelling to FindService"
  454.     Shell $(UtilityInf) FindService, $(KeyProduct)
  455.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  456.         Debug-Output "INF: FindService shell failure"
  457.         Goto ShellCodeError
  458.     Endif
  459.     Ifstr(i) $($R0) != NO_ERROR
  460.         Debug-Output "INF: FindService Shell error: "$($R0)
  461.         Goto fatalregistry
  462.     endif
  463.  
  464.     Set KeyParameters = $($R2)
  465.  
  466.     ;
  467.     ;  We don't need the services key, so close it.
  468.     ;
  469.     CloseRegKey $($R1)
  470.  
  471.     Ifstr $(KeyParameters) == $(KeyNull)
  472.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  473.         Debug-Output "Cannot find component service"
  474.         goto fatalregistry
  475.     endif
  476.  
  477.     set OldVersionExisted = $(TRUE)
  478.  
  479.     set ValueName = ""
  480.     set ValueData = ""
  481.     set ValueStr  = ""
  482.     set ValueList = {}
  483.  
  484.     ;
  485.     ; Get the old values
  486.     ;
  487.  
  488.     Debug-Output "Before EnumRegValue"
  489.     EnumRegValue $(KeyParameters) ValueList
  490.     Debug-Output "After EnumRegValue"
  491.     ForListDo $(ValueList)
  492.         set ValueItem = $($)
  493.         set ValueName = *($(ValueItem),1)
  494.         set ValueData = *($(ValueItem),4)
  495.     Debug-Output " ForListDo LOOP"
  496.         Ifstr(i) $(ValueName) == "CardType"
  497.             set CardType = $(ValueData)
  498.         else-Ifstr(i) $(ValueName) == "InterruptNumber"
  499.             set IRQLevel = $(ValueData)
  500.         else-Ifstr(i) $(ValueName) == "IOBaseAddress"
  501.             set IOAddrValue = $(ValueData)
  502.         else-Ifstr(i) $(ValueName) == "DMAChannel"
  503.             set DMAChannel = $(ValueData)
  504.         endif
  505. ;
  506. ;   Put up the adapter configuration dialog if necessary.
  507. ;
  508. adaptersetup = +
  509.  
  510.     Shell "" DebugConfiguration "before displaying dialog"
  511.  
  512.     Set from = adapteroptions
  513.  
  514.     Set IOADDR_Hex_Value = *($(IOADDR_Hex_List), ~($(IOADDR_Addr_List),$(IOBaseAddrValue)))
  515.  
  516.     ;===================================================
  517.     ;  Netcard Detection logic
  518.     ;
  519.     ;   Check that this card's parameters can be
  520.     ;   fully detected.
  521.     ;
  522.     Shell $(ParamInf) Param_ParameterConfidence
  523.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  524.         Debug-Output "OEMNADE2.INF: parameter confidence too low to bypass configuration"
  525.         Goto adapteroptions
  526.     Endif
  527.     ;
  528.     ;   If this is a detected card and we're in EXPRESS mode,
  529.     ;   see if the parameters as they currently exist are
  530.     ;   verifiably correct.
  531.     ;
  532.     Ifstr(i) $(DetectedCard) == TRUE
  533.         Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  534.             Goto adapterverify
  535.         Endif
  536.     Endif
  537.     ;
  538.     ;  End Netcard Detection logic
  539.     ;===================================================
  540.  
  541. adapteroptions = +
  542.  
  543.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  544.  
  545.     ui start "InputDlg"
  546.  
  547.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  548.         set IRQ_Level = $(Combo1Out)
  549.         set IOBaseAddress = $(Combo2Out)
  550.         set DMAChannel = $(Combo3Out)
  551.     set IOAddrValue = *($(IOBaseAddressValue), ~($(IOBaseAddressList),+
  552.     $(IOBaseAddress)))
  553.    ui pop 1
  554.     else-ifstr(i) $(DLGEVENT) == "BACK"
  555.         set CommonStatus = STATUS_USERCANCEL
  556.         Debug-Output "Action: exit. Bye."
  557.         ui pop 1
  558.         goto end
  559.     else
  560.         Debug-Output "Action: unknown. Bye."
  561.         ui pop 1
  562.         goto end
  563.     endif
  564.  
  565. adapterverify = +
  566.  
  567.     Shell "" DebugConfiguration "after running dialog"
  568.  
  569.     ;===================================================
  570.     ;  Netcard Detection logic
  571.     ;
  572.     ;   If this is a detected card, attempt to validate the options
  573.     ;
  574.     Ifstr(i) $(DetectedCard) != TRUE
  575.         Goto skipoptions
  576.     Endif
  577.  
  578.     Debug-Output "OEMNADE2.INF: Calling Param_VerifyCard"
  579.     Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  580.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  581.         Debug-Output "OEMNADE2.INF: Param_VerifyCard succeeded"
  582.         Goto skipoptions
  583.     Endif
  584.     ;
  585.     ;   Give the user a chance to retry or force the options given.
  586.     ;
  587.     Set from = adapteroptions
  588.     Set to = skipoptions
  589.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  590.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  591.         Debug-Output "ShellCode error: cannot get an error string."
  592.         goto ShellCodeError
  593.     endif
  594.     set Error = $($R0)
  595.     Goto Warning
  596.     ;
  597.     ;  End Netcard Detection logic
  598.     ;===================================================
  599.  
  600. ;
  601. ;   If installing, go create the necessary keys;
  602. ;   if configuring, they're already open.
  603. ;
  604. skipoptions =+
  605.     Shell "" DebugConfiguration "SkipOptions"
  606.     ifint $(OldVersionExisted) == $(TRUE)
  607.         ifstr(i) $(!NTN_InstallMode) == configure
  608.             goto writeparameters
  609.         endif
  610.     endif
  611.     StartWait
  612.     ;
  613.     ; Add Software Component
  614.     ;
  615.     Debug-Output "After Start Wait"
  616.     ifint $(OldVersionExisted) == $(FALSE)
  617.         ifstr(i) $(!NTN_InstallMode) == "install"
  618.            Ifstr(i) $(DoCopy) == "YES"
  619.  
  620.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  621.  
  622.               Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  623.                   Goto ShellCodeError
  624.               Else-Ifstr(i) $($R0) == STATUS_FAILED
  625.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  626.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  627.                       goto ShellCodeError
  628.                   endif
  629.                   set Error = $($R0)
  630.                   Goto fatal
  631.               Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  632.                   Goto successful
  633.               Endif
  634.  
  635.               Set SrcDir = $($R1)
  636.  
  637.            Endif
  638.            Debug-Output "Calling Install-Option "
  639.            install "Install-Option"
  640.            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  641.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  642.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  643.                   goto ShellCodeError
  644.               endif
  645.               set Error = $($R0)
  646.               goto fatal
  647.            endif
  648.         endif
  649.         Debug-Output "Calling Shell 1"
  650.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  651.             $(ProductSoftwareName), +
  652.             $(ProductSoftwareName), +
  653.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  654.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  655.             $(NetEventDLL)
  656.  
  657.         Set OEM_ABANDON_SOFTWARE = TRUE
  658.  
  659.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  660.             Debug-Output "ShellCode error"
  661.             goto ShellCodeError
  662.         endif
  663.         ;
  664.         ;   At this point:
  665.         ;     $R1 contains the product version key handle;
  666.         ;     $R2 contains the NetRules subkey handle;
  667.         ;     $R3 contains the new Services key handle; and
  668.         ;     $R4 contains the Parameters key
  669.         ;     $R5 contains the Linkage Key
  670.         ;
  671.         set RegistryErrorIndex = $($R0)
  672.         set KeyProduct      = $($R1)
  673.         Set SoftNetRulesKey = $($R2)
  674.         CloseRegKey $($R3)
  675.         CloseRegKey $($R4)
  676.         CloseRegKey $($R5)
  677.  
  678.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  679.             EndWait
  680.             Debug-Output "Registry error: add software components"
  681.             CloseRegKey $(KeyProduct)
  682.             CloseRegKey $(SoftNetRulesKey)
  683.             goto fatalregistry
  684.         endif
  685.  
  686.         Shell "" DebugConfiguration "Before NewValueList 1 "
  687.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  688.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  689.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  690.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  691.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  692.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  693.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  694.  
  695.         Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  696.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  697.             Debug-Output "ShellCode error."
  698.             goto ShellCodeError
  699.         endif
  700.  
  701.         set RegistryErrorIndex = $($R0)
  702.  
  703.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  704.             EndWait
  705.             Debug-Output "Registry error: add value list."
  706.             CloseRegKey $(KeyProduct)
  707.             CloseRegKey $(SoftNetRulesKey)
  708.             goto fatalregistry
  709.         endif
  710.         Shell "" DebugConfiguration "Before NewValueList 2 "
  711.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  712.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  713.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  714.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  715.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  716.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  717.  
  718.         Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  719.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  720.             Debug-Output "ShellCode error."
  721.             goto ShellCodeError
  722.         endif
  723.  
  724.         set RegistryErrorIndex = $($R0)
  725.  
  726.         CloseRegKey $(KeyProduct)
  727.         CloseRegKey $(SoftNetRulesKey)
  728.  
  729.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  730.             EndWait
  731.             Debug-Output "Resgitry error: add value list."
  732.             goto fatalregistry
  733.         endif
  734.     endif
  735. ;
  736. ;   Create the HARDWARE\Netcard region and its corresponding service
  737. ;
  738.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  739.  
  740.     ifint $($R4) != -1
  741.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  742.     endif
  743.  
  744.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  745.         Debug-Output "Cannot add hardware component"
  746.         goto ShellCodeError
  747.     endif
  748.  
  749.     set RegistryErrorIndex = $($R0)
  750.  
  751.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  752.         EndWait
  753.         Debug-Output "Registry error: add hardware component"
  754.         CloseRegKey $($R1)
  755.         CloseRegKey $($R2)
  756.         CloseRegKey $($R3)
  757.         goto fatalregistry
  758.     endif
  759.  
  760. ;
  761. ;   At this point:
  762. ;     $R1  Registry key variable for HARDWARE\Netcard\(n)
  763. ;     $R2  Registry key variable for HARDWARE\Netcard\(n)\\NetRules
  764. ;     $R3  Registry key handle for <service>\Parameters key
  765. ;     $R4  Adapter number assigned to adapter
  766. ;     $R5  Service name generated by combining svc name with adapter number
  767. ;
  768.     set KeyParameters = $($R3)
  769.     set KeyAdapterRules = $($R2)
  770.     set AdapterNumber = $($R4)
  771.  
  772.     Shell "" DebugConfiguration "Before NewValueList 3 "
  773.     set NewValueList = {+
  774.     {Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  775.     {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  776.     {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  777.     {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  778.     {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  779.     {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  780.  
  781.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  782.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  783.         Debug-Output "ShellCode error"
  784.         goto ShellCodeError
  785.     endif
  786.  
  787.     CloseRegKey $($R1)
  788.  
  789.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  790.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  791.     Shell "" DebugConfiguration "Before NewValueList 4 "
  792.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  793.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  794.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  795.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  796.  
  797.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  798.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  799.         Debug-Output "ShellCode error."
  800.         goto ShellCodeError
  801.     endif
  802.  
  803.     set RegistryErrorIndex = $($R0)
  804.     Debug-Output "After RegistryErrorIndex "
  805.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  806.         EndWait
  807.         Debug-Output "Resgitry error: add value list."
  808.         CloseRegKey $(KeyParameters)
  809.         CloseRegKey $(KeyAdapterRules)
  810.         goto fatalregistry
  811.     endif
  812.  
  813.     CloseRegKey $(KeyAdapterRules)
  814.  
  815.     goto writeparameters
  816. ;
  817. ;   REQUIRED:   $(KeyParameters) contains service Parameters key handle
  818. ;
  819. writeparameters = +
  820.     Debug-Output "After writeparameters "
  821.     Shell $(UtilityInf), GetBusTypeNum
  822.     set BusTypeNum = $($R1)
  823.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  824.         Debug-Output "ShellCode error."
  825.         goto ShellCodeError
  826.     endif
  827. ;
  828. ;   Add the rest of the parameters to the Services area
  829. ;
  830.     Debug-Output "NewValueList 5 "
  831.     set NewValueList = {+
  832.     {MediaType,$(NoTitle),$(!REG_VT_DWORD),2},+
  833.     {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  834.     {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQ_Level)},+
  835.     {IoBase,$(NoTitle),$(!REG_VT_DWORD),$(IOAddrValue)},+
  836.     {DMAChannel,$(NoTitle),$(!REG_VT_DWORD),$(DMAChannel)}+
  837.     }
  838.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  839.  
  840.     CloseRegKey $(KeyParameters)
  841.  
  842.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  843.         Debug-Output "ShellCode error."
  844.         goto ShellCodeError
  845.     endif
  846.  
  847.     set RegistryErrorIndex = $($R0)
  848.  
  849.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  850.         Debug-Output "Registry error: Add value list"
  851.         goto fatalregistry
  852.     endif
  853.  
  854.     EndWait
  855.  
  856.     goto successful
  857.  
  858. ;-----------------------------------------------
  859. ; Binding section
  860. ;-----------------------------------------------
  861. bindingadapter =+
  862.     set Error = "Binding: Sorry, not yet implemented."
  863.     goto fatal
  864.  
  865. ;-----------------------------------------------
  866. ; Removeadapter section
  867. ;-----------------------------------------------
  868.  
  869. removeadapter = +
  870.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  871.         ; Remove Software Component
  872.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  873.             $(ProductSoftwareName)
  874.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  875.             Debug-Output "ShellCode error"
  876.             goto ShellCodeError
  877.         endif
  878.  
  879.         set RegistryErrorIndex = $($R0)
  880.  
  881.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  882.             goto fatalregistry
  883.         endif
  884.     else
  885.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  886.             $(ProductSoftwareName), $(!NTN_RegBase)
  887.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  888.             Debug-Output "ShellCode error"
  889.             goto ShellCodeError
  890.         endif
  891.  
  892.         set RegistryErrorIndex = $($R0)
  893.  
  894.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  895.             goto fatalregistry
  896.         endif
  897.     endif
  898.  
  899.     goto end
  900.  
  901. ;-----------------------------------------------
  902. ; Upgrade Software section
  903. ;-----------------------------------------------
  904.  
  905. UpgradeSoftware = +
  906.     ;
  907.     ; First determine whether we want to do upgrade or update for software
  908.     ; or hardware component. Then we will determine whether the Mode is
  909.     ; update or upgrade.
  910.     ;
  911.     ; If the same version of the product existed in the registry, we do
  912.     ; update. Otherwise, we will do a upgrade
  913.     ;
  914.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  915.         ; Upgrade software component
  916.         ;
  917.         ; see whether the same version exist or not
  918.         ;
  919.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  920.  
  921.         Ifstr $(KeyProduct) != $(KeyNull)
  922.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  923.             set Version = *($(VersionInfo), 4)
  924.  
  925.             ;
  926.             ; Update the binaries
  927.             ;
  928.             Split-String $(!NTN_Infname), "\", FilenameList
  929.             QueryListSize ListSize $(FilenameList)
  930.             set !UG_Filename = *($(FilenameList), $(ListSize))
  931.  
  932.             install "Install-Update"
  933.             ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  934.                 goto fatal
  935.             endif
  936.  
  937.             ; Upgrade the version number
  938.             ;
  939.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  940.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  941.  
  942.             ;
  943.             ; do nothing for update
  944.             ;
  945.             ifint $(Version) != $(ProductVersion)
  946.                ;
  947.                ; If the major version number is not the same,
  948.                ; it is major upgrade. So let Upgrade the product
  949.                ;
  950.                ;
  951.                ; make other upgrade change if necessary
  952.                ;
  953.             endif
  954.             CloseRegKey $(KeyProduct)
  955.         else
  956.             ;
  957.             ; Cannot Open software key, goto ERROR
  958.             ;
  959.             goto fatalregistry
  960.         endif
  961.     else
  962.         ;
  963.         ; upgrade/update hardware component
  964.         ; There is no different between upgrade and update for hardware
  965.         ; component
  966.         ;
  967.         ; 1. Get the Service Name
  968.         ; 2. Change the NetRule section if necessary
  969.         ;
  970.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  971.               $(MAXIMUM_ALLOWED) NetworkCardKey
  972.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  973.             ;
  974.             ; Get Service name
  975.             ;
  976.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  977.             set ServiceName = *($(ServiceNameInfo), 4)
  978.  
  979.             ;
  980.             ; Change the NetRule if necessary
  981.             ;
  982.             OpenRegKey $(NetworkCardKey) "" "NetRules" +
  983.                 $(MAXIMUM_ALLOWED) NetRuleKey
  984.             Ifstr(i) $(NetRuleKey) != $(KeyNull)
  985.                 ;
  986.                 ; Make the change....
  987.                 ;
  988.             else
  989.                 ;
  990.                 ; Error, cannot open net rules key
  991.                 ;
  992.                 goto fatalregistry
  993.             endif
  994.  
  995.             CloseRegKey $(NetRules)
  996.             CloseRegKey $(NetworkCardKey)
  997.         else
  998.             ;
  999.             ; Error, cannot open network card key
  1000.             ;
  1001.             goto fatalregistry
  1002.         endif
  1003.         ;
  1004.         ; 3. Change the service section of the hardware. i.e.,
  1005.         ;    ParameterName change, value change, etc.
  1006.         ;
  1007.         OpenRegKey $(!REG_H_LOCAL) "" +
  1008.               $(!NTN_ServiceBase)"\"$(ServiceName) +
  1009.               $(MAXIMUM_ALLOWED) ServiceKey
  1010.  
  1011.         Ifstr(i) $(ServiceKey) != $(KeyNull)
  1012.             ;
  1013.             ; Get the ServiceKey to change the Start value
  1014.             ; or Type value. Or open Parameters key to
  1015.             ; change the hardware parameters if necessary.
  1016.             ;
  1017.             CloseRegKey $(ServiceKey)
  1018.         else
  1019.             ;
  1020.             ; Error, cannot open network card key
  1021.             ;
  1022.             goto fatalregistry
  1023.         endif
  1024.     endif
  1025.  
  1026.     goto end
  1027.     ;
  1028.     ; End of Upgrade Software
  1029.     ;
  1030.  
  1031. ;
  1032. ;  Escape hatches
  1033. ;
  1034. successful = +
  1035.     goto end
  1036.  
  1037. abandon = +
  1038.     ForListDo $(OEM_ABANDON_OPTIONS)
  1039.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1040.             $(ProductSoftwareName), $($)
  1041.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1042.             Debug-Output "ShellCode error"
  1043.             goto ShellCodeError
  1044.         endif
  1045.  
  1046.         set RegistryErrorIndex = $($R0)
  1047.  
  1048.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1049.             goto fatalregistry
  1050.         endif
  1051.     EndForListDo
  1052.  
  1053.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  1054.         ; Remove Software Component
  1055.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1056.             $(ProductSoftwareName), FALSE
  1057.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1058.             Debug-Output "ShellCode error"
  1059.             goto ShellCodeError
  1060.         endif
  1061.  
  1062.         set RegistryErrorIndex = $($R0)
  1063.  
  1064.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1065.             goto fatalregistry
  1066.         endif
  1067.     endif
  1068.  
  1069.     goto end
  1070.  
  1071. ;
  1072. ; warning display
  1073. ;
  1074. warning = +
  1075.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1076.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1077.         goto ShellCodeError
  1078.     endif
  1079.     ifstr(i) $($R1) == "OK"
  1080.         goto $(to)
  1081.     else-ifstr(i) $($R1) == "CANCEL"
  1082.         goto $(from)
  1083.     else
  1084.         goto "end"
  1085.     endif
  1086. ;
  1087. ; non fatal error display
  1088. ;
  1089. nonfatalinfo = +
  1090.     Set Severity = STATUS
  1091.     Set CommonStatus = STATUS_USERCANCEL
  1092.     goto nonfatalmsg
  1093. nonfatal = +
  1094.     Set Severity = NONFATAL
  1095.     goto nonfatalmsg
  1096. nonfatalmsg = +
  1097.     ifstr(i) $(Error) == ""
  1098.         Set Severity = NONFATAL
  1099.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1100.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1101.             goto ShellCodeError
  1102.         endif
  1103.         set Error = $($R0)
  1104.     endif
  1105.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1106.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1107.         goto ShellCodeError
  1108.     endif
  1109.     ifstr(i) $($R1) == "OK"
  1110.         goto $(from)
  1111.     else
  1112.         goto "end"
  1113.     endif
  1114.  
  1115. ;
  1116. ;  Registry is broken
  1117. ;
  1118. fatalregistry = +
  1119.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1120.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1121.         goto ShellCodeError
  1122.     endif
  1123.     set Error = $($R0)
  1124.     goto fatal
  1125. ;
  1126. ;  Netcard detection failure
  1127. ;
  1128. fataldetect = +
  1129.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1130.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1131.         Debug-Output "ShellCode error: cannot get an error string."
  1132.         goto ShellCodeError
  1133.     endif
  1134.     set Error = $($R0)
  1135.     Goto fatal
  1136. ;
  1137. ; fatal error display
  1138. ;
  1139. fatal = +
  1140.     ifstr(i) $(Error) == ""
  1141.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1142.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1143.             goto ShellCodeError
  1144.         endif
  1145.         set Error = $($R0)
  1146.     endif
  1147.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1148.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1149.         goto ShellCodeError
  1150.     endif
  1151.  
  1152.     goto setfailed
  1153.  
  1154. ;
  1155. ;  Shelling error
  1156. ;
  1157. ShellCodeError = +
  1158.     set DlgType      = "MessageBox"
  1159.     set STF_MB_TITLE = "Error: "$(FunctionTitle)
  1160.     set STF_MB_TEXT  = "Shell Code Error"
  1161.     set STF_MB_TYPE  = 1
  1162.     set STF_MB_ICON  = 3
  1163.     set STF_MB_DEF   = 1
  1164.     ui start "Error Message"
  1165.     goto setfailed
  1166.  
  1167. setfailed = +
  1168.     set CommonStatus = STATUS_FAILED
  1169.     ;
  1170.     ; if OEM_ABANDON_ON == TRUE, then remove the registry entries
  1171.     ;
  1172.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1173.         set OEM_ABANDON_ON = FALSE
  1174.         goto abandon
  1175.     endif
  1176.     goto end
  1177.  
  1178. end = +
  1179.     goto term
  1180.  
  1181. term = +
  1182.  
  1183.     Return $(CommonStatus)
  1184.  
  1185. [DebugConfiguration]
  1186.  
  1187.     Set InfName = "OEMNADE2.INF"
  1188.     Debug-Output $(InfName)" **CONFIGURATION STATE: "$($0)
  1189.     Debug-Output $(InfName)" IRQ_Level       is "$(!p:IRQ_Level)
  1190.     Debug-Output $(InfName)" IOBaseAddr      is "$(!p:IOAddrValue)
  1191.     Debug-Output $(InfName)" DMA             is "$(!p:DMAChannel)
  1192.     Debug-Output $(InfName)"ProductHardwareTitle"$(!p:ProductHardwareTitle)
  1193.     Debug-Output $(InfName)"ProductSoftwareDescription"$(!p:ProductSoftwareDescription)
  1194.     Debug-Output $(InfName)"ProductHardwareDescription"$(!p:ProductHardwareDescription)
  1195.  
  1196.      return
  1197.  
  1198.  
  1199. ;***************************************************************
  1200. ;  INSTALL SECTIONS
  1201. ;***************************************************************
  1202. [Install-Option]
  1203.     set STF_VITAL = ""
  1204.  
  1205.     ifstr(i) $(AddCopy) == "YES"
  1206.  
  1207.         ;
  1208.         ; Add the files to the copy list
  1209.         ;
  1210.         ;  BUGBUG: eliminate the "nt2" in the next line when Sunil fixes
  1211.         ;      the other INF files
  1212.         ;
  1213.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1214.  
  1215.     endif
  1216.  
  1217.     ifstr(i) $(DoCopy) == "YES"
  1218.  
  1219.        ;
  1220.        ; Copy files in the copy list
  1221.        ;
  1222.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1223.        CopyFilesInCopyList
  1224.  
  1225.     endif
  1226.  
  1227.     Exit
  1228.  
  1229. [Install-Update]
  1230.    set STF_VITAL        = ""
  1231.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1232.    ;set STF_VERSION     = "YES"
  1233.  
  1234.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1235.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1236.  
  1237.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1238.    CopyFilesInCopyList
  1239.  
  1240.    exit
  1241.  
  1242. [Source Media Descriptions]
  1243.     1  = "Windows NT Setup Disk #1"  , TAGFILE = disk1
  1244.     2  = "Windows NT Setup CD-ROM Disk"  , TAGFILE = disk2
  1245.     99    = "LMHOST disk", TAGFILE = lmhosts
  1246. [ProductType]
  1247. STF_PRODUCT  = Winnt
  1248. STF_PLATFORM = I386
  1249. [Files-Inf]
  1250. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  1251. [Files-NI6510]
  1252. 1,NI6510.sys , SIZE=44032
  1253.  
  1254.  
  1255.  
  1256.